package com.houg.testorderapi.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.Data;

/**
 * @author NALHOUG
 */
@Data
@TableName(value = "order")
public class Order {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号-唯一
     */
    @TableField(value = "order_id")
    private String orderId;

    /**
     * 关联的用户
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 订单名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 订单总金额
     */
    @TableField(value = "sum")
    private BigDecimal sum;

    /**
     * 支付方式
     */
    @TableField(value = "pay")
    private String pay;

    /**
     * 订单状态 默认为0未支付 1为已支付
     */
    @TableField(value = "order_state")
    private Integer orderState;

    /**
     * 0为删除 1为正常
     */
    @TableField(value = "is_del")
    private Integer isDel;

    public static final String COL_ID = "id";

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_NAME = "name";

    public static final String COL_SUM = "sum";

    public static final String COL_PAY = "pay";

    public static final String COL_ORDER_STATE = "order_state";

    public static final String COL_IS_DEL = "is_del";
}